home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / ispell40.lha / ispell-4.0 / downcase.c < prev    next >
C/C++ Source or Header  |  1993-04-15  |  992b  |  37 lines

  1. /* Copyright (C) 1990, 1993 Free Software Foundation, Inc.
  2.  
  3.    This file is part of GNU ISPELL.
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2, or (at your option)
  8.    any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #include "charset.h"
  20.  
  21. void
  22. downcase (p, q)
  23.   char *p, *q;
  24. {
  25.   int c;
  26.   while (*q)
  27.     {
  28.       c = charset[(unsigned int) *q].lowercase;
  29.       if (c)
  30.     *p++ = c;
  31.       else
  32.     *p++ = *q;
  33.       q++;
  34.     }
  35.   *p = 0;
  36. }
  37.